<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!doctype html>
<html>
<head>

<!-- 指定本页的起始路径 -->
<base href="${basePath}" >

<meta charset="utf-8">
<title>新闻管理</title>
<style type="text/css">
#apDiv1 {
	position: absolute;
	width: 180px;
	height: 90px;
	z-index: 1;
	left: 10px;
	top: 6px;
}
#apDiv2 {
	position: absolute;
	width: 254px;
	height: 46px;
	z-index: 2;
	left: 519px;
	top: 32px;
}
#apDiv2 ul {
	background-color: #FFF;
	list-style-type: none;
	line-height: 20px;
	height: 20px;
}
#apDiv2 ul li {
	float: left;
	width: 80px;
	margin:auto 5px
}
#apDiv2 ul li a {
	text-decoration: underline;
}
#apDiv3 {
	position: absolute;
	width: 736px;
	height: 325px;
	z-index: 3;
	left: 25px;
	top: 137px;
}
#pager {
	position: absolute;
	width: 422px;
	height: 65px;
	z-index: 1;
	left: 171px;
	top: 246px;
	overflow: hidden;
	text-align: center;
	vertical-align: middle;
}
button {
	vertical-align:middle;
}
</style>
</head>

<body>
<h1 align="center" style="margin:30px auto">管理页</h1>
<hr>
<p>&nbsp;</p>
<div id="apDiv1"><img src="img/logo.jpg" width="180" height="90"></div>
<div id="apDiv2">
<ul>
  <li><a>进入首页</a></li>
  <li><a>退出</a></li>
</ul>
</div>
<div id="apDiv3">
  <table width="100%" height="212" border="1" align="center" cellpadding="0" cellspacing="0">
    <caption>
      新闻列表
    </caption>
    <tr>
      <th height="28" scope="col">
                    标题
      </th>
      <th scope="col">
                    内容 
      </th>
      <th scope="col">
                   作者 
      </th>
      <th scope="col">
                 发布时间   
      </th>
      <th scope="col">
                  编辑操作:<button id="op-add">增加</button>
      </th>
    </tr>
    
    <c:forEach items="${pager.beanList}" var="news">
    
	    <tr>
	      <td height="48">${news.title}</td>
	      <td>${news.content}</td>
	      <td>${news.author}</td>
	      <td>${news.pubdate}</td>
	      <td>
             <input type="hidden" name="id" value="${news.id}">
             <button  id="op-delete">删除</button>
             <button id="op-update">更新</button>
             
          </td>
	    </tr>
	    
    </c:forEach>
    
    
    
  </table>
  <div id="pager">
  
  </div>
</div>
</body>
</html>